package com.adaxi.adc.business.passengertrip.service.impl;

import com.adaxi.adc.business.passengertrip.dao.IPassengerTripDao;
import com.adaxi.adc.business.passengertrip.pojo.AdcPassengerTrip;
import com.adaxi.adc.business.passengertrip.service.IPersonalTripService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PersonalTripImpl extends ServiceImpl<IPassengerTripDao, AdcPassengerTrip> implements IPersonalTripService {
    @Override
    public List<AdcPassengerTrip> getByPassengerId(Long passengerId){
        LambdaQueryWrapper<AdcPassengerTrip> queryWrapper = Wrappers.lambdaQuery();
        queryWrapper.eq(AdcPassengerTrip::getPassengerId, passengerId);
        return list(queryWrapper);
    }
}
